A Language Independent Scanner Generator

نویسنده

  • Teodor Rus
چکیده

This paper discusses a new methodology for scanner generation that supports language independent lexicon speci cation and automatic generation of stand alone lexical analyzers from speci cations. The mechanism that sits at the basis of this methodology is the layering of the lexicon speci cation on two levels: in the rst level, \universal" lexical constructs which are used as building blocks by most programming languages are de ned, and in the second level, customized lexical constructs of speci c programming languages are speci ed in terms of universal lexical constructs. The universal lexicon is speci ed by regular expressions over a global alphabet used by most programming languages, such as the character set of a keyboard, and is e ciently implemented by deterministic nite automata. The customized lexicon is conveniently speci ed by regular expressions of properties of universal lexical constructs and is implemented by nondeterministic automata whose transition function is determined by the truth value of properties of universal lexemes rather than by the letters of some alphabet. Tools that transform a lexicon speci cation into a stand alone lexical analyzer are developed and reported. The methodology discussed in this paper is convenient because the user operates with meaningful constructs and no programming, in the usual sense, is required. The lexical analyzers thus speci ed are e cient and their correctness is mathematically guaranteed.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

LexAGen: An Interactive Incremental Scanner Generator

This paper describes LexAGen, an interactive scanner generator which is the first component of an interactive compiler generation environment. LexAGen can generate fast scanners for languages whose tokens can be specified by regular grammars. However, LexAGen also supports several context sensitive programming language constructs like nested comments and the interaction between floating point n...

متن کامل

Object–Oriented Tokens for the Parser Generator jay

jay is a parser generator for JAVA derived from ATTs’ parser generator yacc, which was designed for the C programming language. Being based on yacc, jay is not well adapted for object-orientation, because this principle is not known in the C-world. To correct this flaw jay was redesigned to cope with objects. 1 The Parser Generator jay The parser generator jay [1] is a tool which generates for ...

متن کامل

Compiler/Interpreter Generator System LISA

This paper describes the LISA system which is a generic interactive environment for programming language development. From the formal language specifications of a particular programming language LISA produces a language specific environment that includes a languageknowledgable editor, a compiler/interpreter and other graphic tools. The paper focuses on design decisions, implementation issues an...

متن کامل

ALADIN: A Scanner Generator for Incremental Programming Environments

A large number of scanner generators have been developed. Since they are restricted to the longestmatch rule, they are unsuitable for an incremental environment. We present the ALADIN system, which is able to deliver more than a single token if required. Thus, an ambiguity may be passed to the calling instance. Beyond this ‘incremental feature’, ALADIN is a well-structured and easy-to-understan...

متن کامل

Development of a Low Cost Foot-scanner for a Custom Shoe Tailoring System

INTRODUCTION We propose a low-cost foot scanner to replace the expensive ones. Components used in our scanner and shape acquisition method are entirely different from those of other classical foot scanners. Several PC cameras are used instead of expensive CCD cameras. Also, the suggested scanner does not require expensive moving mechanism, emitters (laser generator or pattern generator) and som...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998